package com.example.education.service;

import com.example.education.exception.ParamException;
import com.example.education.model.Reply;

import java.util.List;

/**
 * 提供对提问以及评价的回复，删除回复，点赞回和查询回复的接口。
 */
public interface ReplyService {

    /**
     * 新增回复
     * @param reply
     * @return
     */
    boolean insertReply(Reply reply) throws ParamException;

    /**
     * 删除回复
     * @param replyId
     * @return
     */
    boolean deleteReply(Integer replyId) throws ParamException;

    /**
     * 点赞回复
     * @param replyId
     * @return
     */
    boolean likeReply(Integer replyId) throws ParamException;

    /**
     * 根据编号查询回复
     * @param replyId
     * @return
     */
    Reply getReplyById(Integer replyId) throws ParamException;

    /**
     * 根据回复父id和类型查询回复
     * @param cate 回复类型
     * @param pid 回复Pid
     * @return
     */
    List<Reply> getRelyByCateAndPid(Integer cate,Integer pid) throws ParamException;

}
